# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Saijin-Naib <Saijin-Naib_package-maintenance@outlook.com>
pkgname=gnome-latex
pkgver=3.44.0
pkgrel=5
pkgdesc="LaTeX editor for the GNOME desktop"
url="https://gitlab.gnome.org/swilmet/gnome-latex"
# s390x, ppc64le and riscv64 blocked by texlive
arch="all !ppc64le !s390x !riscv64"
license="GPL-3.0-or-later"
depends="
	gsettings-desktop-schemas
	texlive
	"
makedepends="
	autoconf
	automake
	dconf-dev
	gobject-introspection-dev
	gsettings-desktop-schemas-dev
	gspell-dev
	gtk-doc
	intltool
	itstool
	libgee-dev
	libtool
	tepl-dev
	vala
	yelp
	"
subpackages="$pkgname-doc $pkgname-lang"
source="https://download.gnome.org/sources/gnome-latex/${pkgver%.*}/gnome-latex-$pkgver.tar.xz
	"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
d1dc7b2321438ebed7a209c7c750123a0dcf8ebcf92f73fd7eb4c79282f51d6b6a8328ee8759326f43e53dbd2ba9d1fadc056c2fcea11e7785e7c27574707e95  gnome-latex-3.44.0.tar.xz
"
